<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<chiptrack:checkLogon sourcePage="/newQuotation.do"/>
<%
    String chipTracContext = "/" + ConfigManager.getChipTracContext();
    int i = 0;
    int m = 0;
    String selectedMethod = null;
    String selectedAccount = null;
    com.scalar.chiptrack.sales.forms.quote.QuotationForm quotationForm1 = null;
%>
<%@page import="  java.util.ArrayList,
                  com.scalar.chiptrack.utils.ConfigManager,
                  com.scalar.chiptrack.commons.SessionKeys,
                  com.scalar.chiptrack.commons.Constants,
                  com.scalar.chiptrack.users.User,
                  com.scalar.chiptrack.users.Functionality,
                  com.scalar.chiptrack.sales.forms.quote.QuotationForm,
                  com.scalar.chiptrack.sales.Quotation" %>
<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type="text/css" rel="stylesheet">
<script src="<%=chipTracContext%>/jsp/includes/scripts/functions.js"></script>
<script language="JavaScript" src="<%=chipTracContext%>/jsp/includes/scripts/validations.js"></script>
<script language="JavaScript">
    function showHideNewEndUserField()
    {
        var form = document.QuotationForm;
        var endUserCtrl = form.endCustomerId;
        var newEndUserNameCtrl = form.newEndUserName;
        var endUserLabelSpan = document.getElementById ( "endUserLabelSpan" );
        var endUserTxfieldSpan = document.getElementById ( "endUserTxfieldSpan" );
        if ( endUserCtrl.value == "-2" )
        {
            endUserLabelSpan.style.display = 'block'
            endUserTxfieldSpan.style.display = 'block'
        }
        else
        {
            newEndUserNameCtrl.value = "";
            endUserLabelSpan.style.display = 'none'
            endUserTxfieldSpan.style.display = 'none'
        }
    }
    function showHideNewEndCustomerField()
    {
        var form = document.QuotationForm;
        var endCustomerCtrl = form.odmId;
        var newEndCustomerCtrl = form.newEndCustomerName;
        var endCustomerLabelSpan = document.getElementById ( "endCustomerLabelSpan" );
        var endCustomerTxfieldSpan = document.getElementById ( "endCustomerTxfieldSpan" );
        if ( endCustomerCtrl.value == "-2" )
        {
            endCustomerLabelSpan.style.display = 'block'
            endCustomerTxfieldSpan.style.display = 'block'
        }
        else
        {
            newEndCustomerCtrl.value = "";
            endCustomerLabelSpan.style.display = 'none'
            endCustomerTxfieldSpan.style.display = 'none'
        }
    }
    function rebateValidation(rebate)
    {
        var form = document.QuotationForm;
        if (rebate.checked == true)
        {
            form.rebateValue.disabled= false;
            form.rebateOpertunity.disabled= false;
            form.rebateTargetValue.disabled= false;
            form.rebateGoal.disabled= false;
            form.rebateTargetGoalTimeFrame.disabled= false;
            form.rebateTargetGoalTimeFrameOthers.disabled= false;
            form.rebateVerifiedBy.disabled= false;
        }
        else
        {
            form.rebateValue.disabled= true;
            form.rebateOpertunity.disabled= true;
            form.rebateTargetValue.disabled= true;
            form.rebateGoal.disabled= true;
            form.rebateTargetGoalTimeFrame.disabled= true;
            form.rebateTargetGoalTimeFrameOthers.disabled= true;
            form.rebateVerifiedBy.disabled= true;
        }
    }
    function previousQuotationValidation(previousQuotation)
    {
        var form = document.QuotationForm;
        if (previousQuotation.checked == true)
        {
            form.previousQuotationDetails.disabled= false;
        }
        else
        {
            form.previousQuotationDetails.disabled= true;
        }
    }
    function contractPriceValidation(contractPrice)
    {
        var form = document.QuotationForm;

        if (contractPrice.checked == true)
        {
            form.contractPriceFilePath.disabled= false;
            form.contractPriceChangedReason.disabled = false;
        }
        else
        {
            form.contractPriceFilePath.disabled= true;
            form.contractPriceChangedReason.disabled = true;
        }
    }
    function selectCompetatior1(competatior)
    {
        var form = document.QuotationForm;
        if ( competatior.value == 'Other')
        {
            form.competatior1Others.disabled =false;
        }
        else
        {
            form.competatior1Others.disabled =true;
        }
    }
    function selectCompetatior2(competatior)
    {
        var form = document.QuotationForm;
        if ( competatior.value == 'Other')
        {
            form.competatior2Others.disabled =false;
        }
        else
        {
            form.competatior2Others.disabled =true;
        }
    }
    function showHidepriceOthersField()
    {
        var form = document.QuotationForm;
        var currentPriceUnitsCtrl = form.currentPriceUnitsType;
        var currentPriceOthersCtrl = form.currentPriceOthers;
        var currentPriceOthersLabelSpan = document.getElementById ( "currentPriceOthersLabelSpan" );
        var currentPriceOthersTxfieldSpan = document.getElementById ( "currentPriceOthersTxfieldSpan" );
        if ( currentPriceUnitsCtrl.value == "NA" )
        {
            currentPriceOthersLabelSpan.style.display = 'block'
            currentPriceOthersTxfieldSpan.style.display = 'block'
        }
        else
        {
            currentPriceOthersCtrl.value = "";
            currentPriceOthersLabelSpan.style.display = 'none'
            currentPriceOthersTxfieldSpan.style.display = 'none'
        }
    }
    function showHideTargetPriceOthersField()
    {
        var form = document.QuotationForm;
        var targetPriceUnitsCtrl = form.targetPriceUnitsType;
        var targetPriceOthersCtrl = form.targetPriceOthers;
        var targetPriceOthersLabelSpan = document.getElementById ( "targetPriceOthersLabelSpan" );
        var targetPriceOthersTxfieldSpan = document.getElementById ( "targetPriceOthersTxfieldSpan" );
        if ( targetPriceUnitsCtrl.value == "NA" )
        {
            targetPriceOthersLabelSpan.style.display = 'block'
            targetPriceOthersTxfieldSpan.style.display = 'block'
        }
        else
        {
            targetPriceOthersCtrl.value = "";
            targetPriceOthersLabelSpan.style.display = 'none'
            targetPriceOthersTxfieldSpan.style.display = 'none'
        }
    }

    function showHideCompetatior1OthersField()
    {
        var form = document.QuotationForm;
        var competitor1Ctrl = form.competatior1;
        var competitor1OthersCtrl = form.competatior1Others;
        var competitor1OthersLabelSpan = document.getElementById ( "competitor1OthersLabelSpan" );
        var competitor1OthersTxfieldSpan = document.getElementById ( "competitor1OthersTxfieldSpan" );
        if ( competitor1Ctrl.value == "Other" )
        {
            competitor1OthersLabelSpan.style.display = 'block'
            competitor1OthersTxfieldSpan.style.display = 'block'
        }
        else
        {
            competitor1OthersCtrl.value = "";
            competitor1OthersLabelSpan.style.display = 'none'
            competitor1OthersTxfieldSpan.style.display = 'none'
        }
    }
    function showHideCompetatior2OthersField()
    {
        var form = document.QuotationForm;
        var competitor2Ctrl = form.competatior2;
        var competitor2OthersCtrl = form.competatior2Others;
        var competitor2OthersLabelSpan = document.getElementById ( "competitor2OthersLabelSpan" );
        var competitor2OthersTxfieldSpan = document.getElementById ( "competitor2OthersTxfieldSpan" );
        if ( competitor2Ctrl.value == "Other" )
        {
            competitor2OthersLabelSpan.style.display = 'block'
            competitor2OthersTxfieldSpan.style.display = 'block'
        }
        else
        {
            competitor2OthersCtrl.value = "";
            competitor2OthersLabelSpan.style.display = 'none'
            competitor2OthersTxfieldSpan.style.display = 'none'
        }
    }
    function showHideCompetatior1PriceUnitsTypeField()
    {
        var form = document.QuotationForm;
        var competatior1PriceUnitsTypeCtrl = form.competatior1PriceUnitsType;
        var competatior1PriceUnitOthersCtrl = form.competatior1PriceUnitOthers;
        var competitor1PriceOthersLabelSpan = document.getElementById ( "competitor1PriceOthersLabelSpan" );
        var competitor1PriceOthersTxfieldSpan = document.getElementById ( "competitor1PriceOthersTxfieldSpan" );
        if ( competatior1PriceUnitsTypeCtrl.value == "NA" )
        {
            competitor1PriceOthersLabelSpan.style.display = 'block'
            competitor1PriceOthersTxfieldSpan.style.display = 'block'
        }
        else
        {
            competatior1PriceUnitOthersCtrl.value = "";
            competitor1PriceOthersLabelSpan.style.display = 'none'
            competitor1PriceOthersTxfieldSpan.style.display = 'none'
        }
    }
    function showHideCompetatior2PriceUnitsTypeField()
    {
        var form = document.QuotationForm;
        var competatior2PriceUnitsTypeCtrl = form.competatior2PriceUnitsType;
        var competatior2PriceUnitOthersCtrl = form.competatior2PriceUnitOthers;
        var competitor2PriceOthersLabelSpan = document.getElementById ( "competitor2PriceOthersLabelSpan" );
        var competitor2PriceOthersTxfieldSpan = document.getElementById ( "competitor2PriceOthersTxfieldSpan" );
        if ( competatior2PriceUnitsTypeCtrl.value == "NA" )
        {
            competitor2PriceOthersLabelSpan.style.display = 'block'
            competitor2PriceOthersTxfieldSpan.style.display = 'block'
        }
        else
        {
            competatior2PriceUnitOthersCtrl.value = "";
            competitor2PriceOthersLabelSpan.style.display = 'none'
            competitor2PriceOthersTxfieldSpan.style.display = 'none'
        }
    }

    function showHideRebateTargetPriceOthersField()
    {
        var form = document.QuotationForm;
        var rebateTargetGoalTimeFrameCtrl = form.rebateTargetGoalTimeFrame;
        var rebateTargetGoalTimeFrameOthersCtrl = form.rebateTargetGoalTimeFrameOthers;
        var rebateTargetPriceOthersLabelSpan = document.getElementById ( "rebateTargetPriceOthersLabelSpan" );
        var rebateTargetPriceOthersTxfieldSpan = document.getElementById ( "rebateTargetPriceOthersTxfieldSpan" );
        if ( rebateTargetGoalTimeFrameCtrl.value == "NA" )
        {
            rebateTargetPriceOthersLabelSpan.style.display = 'block'
            rebateTargetPriceOthersTxfieldSpan.style.display = 'block'
        }
        else
        {
            rebateTargetGoalTimeFrameOthersCtrl.value = "";
            rebateTargetPriceOthersLabelSpan.style.display = 'none'
            rebateTargetPriceOthersTxfieldSpan.style.display = 'none'
        }
    }
    function submitPage(action)
    {
        var errors  = "";
        var pa = document.getElementById ( "errors1" );
        var form = document.QuotationForm;
		var success = false;
        if ( document.QuotationForm.endCustomerId.value == '-1' || document.QuotationForm.endCustomerId.value == '' )
        {
            errors = errors+ '<li> Please select <bean:message key="label.sales.endUser"/>';
            document.QuotationForm.endCustomerId.focus();
        }
        else if ( document.QuotationForm.endCustomerId.value == '-2' && document.QuotationForm.newEndUserName.value.trim() == '' )
        {
            errors = errors1+ '<li> Please enter new <bean:message key="label.sales.endUser"/>';
            document.QuotationForm.newEndUserName.focus();
        }

        if ( document.QuotationForm.odmId.value == '-1' || document.QuotationForm.odmId.value == '' )
        {
            errors = errors+ '<li> Please select <bean:message key="label.sales.endCustomer"/>';
            document.QuotationForm.odmId.focus();
        }
        else if ( document.QuotationForm.odmId.value == '-2' && document.QuotationForm.newEndCustomerName.value.trim() == '' )
        {
            errors = errors+ '<li> Please enter new <bean:message key="label.sales.endCustomer"/>';
            document.QuotationForm.newEndCustomerName.focus();
        }

        if ( document.QuotationForm.quotationType.value == '-1' || document.QuotationForm.quotationType.value == '' )
        {
            errors = errors+ '<li> Please select Quotation Type';
            document.QuotationForm.quotationType.focus();
        }
        if(errors != '')
        {
            pa.innerHTML = errors;
	        return;
        }
        form.rebateValue.disabled= false;
        form.rebateOpertunity.disabled= false;
        form.rebateTargetValue.disabled= false;
        form.rebateGoal.disabled= false;
        form.rebateTargetGoalTimeFrame.disabled= false;
        form.rebateTargetGoalTimeFrameOthers.disabled= false;
        form.rebateVerifiedBy.disabled= false;
        form.competatior1Others.disabled =false;
        form.competatior2Others.disabled =false;
        form.contractPriceFilePath.disabled= false;
        form.contractPriceChangedReason.disabled = false;
        form.previousQuotationDetails.disabled= false;
        form.action.value ='NewQuotationWithQuestion' ;
        form.submit();
    }
    function resetForm()
    {
        var form = document.QuotationForm;
        form.reset();
    }
    function calculateMargin()
    {
        var form = document.QuotationForm;
        var distributorMargin =form.distributorMargin.value;
        var targetPrice= form.targetPrice.value;
        var targetPriceUnits = form.targetPriceUnits.value;
        var marginAmount=0;
        if (distributorMargin > 0)
        {
             if (targetPrice> 0 && targetPriceUnits>0)
             {
               marginAmount=((distributorMargin/100)* (targetPrice*targetPriceUnits));
             }
        }
        marginAmount = '' +   round(marginAmount,3) ;
        var p1= marginAmount.indexOf('.');
        if ( parseInt ( p1 ) == -1 )
		{
			marginAmount += '.000'
		}
		else if ( parseInt ( p1 ) != -1 )
		{
			var p2 = marginAmount.substring ( p1, marginAmount.length );
            if ( parseInt( p2.length ) < 3 )
			{
				marginAmount += '00';
			}
            if ( parseInt( p2.length ) >= 3 && parseInt( p2.length ) < 4 )
			{
				marginAmount += '0';
			}
        }
     form.marginDollars.readOnly= false;
     form.marginDollars.value=  marginAmount;
     form.marginDollars.readOnly= true;
    }
   function quotationDetails( qNumb, qDate, endCus, newEndCus, endUser, newEndUser, partNumber, qty, price, salesorderNo, shipDate, scheduleDate)
    {
        this.qNumb = qNumb;
        this.qDate = qDate;
        this.endCus = endCus;
        this.newEndCus = newEndCus;
        this.endUser = endUser;
        this.newEndUser = newEndUser;
        this.pNumber = partNumber;
        this.qty = qty;
        this.price = price;
        this.salesorderNo= salesorderNo;
        this.shipDate = shipDate;
        this.scheduleDate = scheduleDate;
    }
    var qa = new Array();
    var qaPrice = new Array();
    var qaCommitments = new Array();
    <logic:present name="prevQuotationsList">
    <logic:iterate id="prevQuotation" name="prevQuotationsList" type="com.scalar.chiptrack.sales.PreviousQuotationDetails" indexId="idx">
        qa[<%=idx.intValue()%>] = new quotationDetails('<bean:write name="prevQuotation" property="quotationNo"/>','<bean:write name="prevQuotation" property="quotationDate"/>', '<bean:write name="prevQuotation" property="endCustomerName"/>', '<bean:write name="prevQuotation" property="newEndCustomerName"/>', '<bean:write name="prevQuotation" property="endUserName"/>', '<bean:write name="prevQuotation" property="newEndUserName"/>', '<bean:write name="prevQuotation" property="partNumber"/>', '<bean:write name="prevQuotation" property="qty"/>','<bean:write name="prevQuotation" property="unitCost"/>', 'Previous Quotaton Details');
    </logic:iterate>
    </logic:present>
    <logic:present name="prevQuotationPriceList">        
    <logic:iterate id="prevQuotationPrice" name="prevQuotationPriceList" type="com.scalar.chiptrack.sales.PreviousQuotationDetails" indexId="idx1">
          qaPrice[<%=idx1.intValue()%>] = new quotationDetails('<bean:write name="prevQuotationPrice" property="quotationNo"/>','<bean:write name="prevQuotationPrice" property="quotationDate"/>', '<bean:write name="prevQuotationPrice" property="endCustomerName"/>', '<bean:write name="prevQuotationPrice" property="newEndCustomerName"/>', '<bean:write name="prevQuotationPrice" property="endUserName"/>', '<bean:write name="prevQuotationPrice" property="newEndUserName"/>', '<bean:write name="prevQuotationPrice" property="partNumber"/>', '<bean:write name="prevQuotationPrice" property="qty"/>','<bean:write name="prevQuotationPrice" property="unitCost"/>', 'Latest Price Details In Quotations');
    </logic:iterate>
    </logic:present>
     <logic:present name="prevCommitmentsDetails">
    <logic:iterate id="prevCommitments" name="prevCommitmentsDetails" type="com.scalar.chiptrack.sales.PreviousQuotationDetails" indexId="idx1">
            qaCommitments[<%=idx1.intValue()%>] = new quotationDetails('<bean:write name="prevCommitments" property="quotationNo"/>','<bean:write name="prevCommitments" property="quotationDate"/>', '<bean:write name="prevCommitments" property="endCustomerName"/>', '<bean:write name="prevCommitments" property="newEndCustomerName"/>', '<bean:write name="prevCommitments" property="endUserName"/>', '<bean:write name="prevCommitments" property="newEndUserName"/>', '<bean:write name="prevCommitments" property="partNumber"/>', '<bean:write name="prevCommitments" property="qty"/>','<bean:write name="prevCommitments" property="backlogQty"/>', '<bean:write name="prevCommitments" property="salesOrderNo"/>', '<bean:write name="prevCommitments" property="shipDate"/>', '<bean:write name="prevCommitments" property="scheduleDate"/>');
    </logic:iterate>
    </logic:present>
    function getPrevQuotationsArray()
    {
        return qa;
    }
    function getPrevQuotationsPriceArray()
    {
     return qaPrice;
    }
    function getPrevCommitmentsArray()
    {
     return qaCommitments;
    }

    <%--function loadPrevQuotations()
    {
       newWindow = window.open('<%=chipTracContext%>/jsp/sales/quote/prev_quotations_view.jsp','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=yes,scrollbars=yes,width=800,height=400,left=100,top=50,resizable=yes');
  	   newWindow.focus();
    }--%>
<%--    function loadQuotationsPrices()
    {
       newWindow = window.open('<%=chipTracContext%>/jsp/sales/quote/prev_quotaton_latest_prices.jsp','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=yes,scrollbars=yes,width=800,height=400,left=100,top=50,resizable=yes');
  	   newWindow.focus();
    }--%>

   function loadQuotationsPrices()
    {
       var form = document.QuotationForm;
       var customerId =form.customerId.value;
       newWindow = window.open('<%=chipTracContext%>/previousQuotationPriceDetailsSearch.do?subAction=chiptracPreviousQuoteLatestPriceSearch&customerId='+ customerId ,'optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=yes,scrollbars=yes,width=900,height=400,left=100,top=50,resizable=no');
  	   newWindow.focus();
    }
    function loadPrevQuotations()
    {
       var form = document.QuotationForm;
       var customerId =form.customerId.value;
       newWindow = window.open('<%=chipTracContext%>/previousQuotationsDetailsSearch.do?subAction=chiptracPreviousQuotationsDetailsSearch&customerId='+ customerId ,'optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=yes,scrollbars=yes,width=850,height=400,left=100,top=50,resizable=no');
  	   newWindow.focus();
    }
    <%--function loadPrevCommitments()
    {
       newWindow = window.open('<%=chipTracContext%>/jsp/sales/quote/prev_commitments_details.jsp','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=yes,scrollbars=yes,width=800,height=400,left=100,top=50,resizable=yes');
  	   newWindow.focus();
    }--%>
    function loadPrevCommitments()
    {
       var form = document.QuotationForm;
       var customerId =form.customerId.value;
       newWindow = window.open('<%=chipTracContext%>/previousCommitmentsDetails.do?subAction=chiptracPreviouscommitmnetsDetailsSearch&customerId='+ customerId ,'commitmentsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=yes,scrollbars=yes,width=1000,height=400,left=100,top=50,resizable=no');
  	   newWindow.focus();
    }
</script>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0" <%--onload='check();'--%>>
    <%
        String userTypeChiptrac = Constants.USER_TYPE_CHIPTRAC + "";
    %>
    <logic:equal value="<%=userTypeChiptrac%>" name="user" property="userType" scope="session">
        <%@ include file="/jsp/includes/header.jsp" %>
    </logic:equal>
    <logic:notEqual value="<%=userTypeChiptrac%>" name="user" property="userType" scope="session">
        <%@ include file="/jsp/includes/extHeader.jsp" %>
    </logic:notEqual>

 <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>
<%-- Side Navigation start --%>
<%
    String heading = "";
    if((request.getParameter("quotation") != null) && (request.getParameter("quotation").equals("0")))
    {
        heading = "Quotation Questionnaire";
    }
%>
        <logic:equal value="<%=userTypeChiptrac%>" name="user" property="userType" scope="session">
            <%@ include file="/jsp/sales/sales_order_menu.jsp" %>
        </logic:equal>
        <logic:notEqual value="<%=userTypeChiptrac%>" name="user" property="userType" scope="session">
            <%@ include file="/jsp/sales/ext_sales_order_menu.jsp" %>
        </logic:notEqual>
<%-- end of the side navigations --%>
</TD>
<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">
<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>
<html:html>
<%-- from here your body starts --%>
<table width="100%" border="0"><tr><td ><center><span class="NArialW">Quotation Questionnaire</span></center></td></table>
<img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10>
 <table border="0" width="100%" align="center">
 <% User user1 = (User) session.getAttribute (SessionKeys.USER_KEY);
      if( !user1.isActionAllowed (Functionality.SALES_NEW_QUOTATION,
      User.USER_ACTION_MODIFY ) ) { %>
        <tr><td colspan=7 align='left'>
        <font class='NArialS'>
		<font color='blue'><b><%=Constants.NO_MODIFY_RIGHTS %></b>
		</font> </font></td></tr>
<% } %>
<html:form name="QuotationForm" action="/newQuotation" method="post" type="com.scalar.chiptrack.sales.forms.quote.QuotationForm" enctype="multipart/form-data">
<% QuotationForm quotationForm = (QuotationForm)request.getAttribute("QuotationForm"); %>
    <html:hidden  name="QuotationForm" property="action"/>
    <tr>
        <td><a name="#e1"></a></td>
    </tr>
    <tr>
        <td colspan=3 class="NArialL"><chiptrack:errors styleClass="NArialL"  /></td>
    </tr>
    <tr>
        <td  colspan="3" align="left" class='NArialL'><FONT id="errors1" styleClass="NArialL" color='FF0000'></FONT></td>
    </tr>
    <tr bgcolor="#FFFFEE">
        <td width="45%" align= "left"><font class="NArialL"><b>&nbsp;</b> Customer Name :&nbsp;</font></td>
        <td width="54%"><font class="NArialL"><bean:write name="QuotationForm" property="customerName" /></font></td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#DEE1E2">
        <td width="45%" align= "left"><font class="NArialL"><b>1.</b> Who is the <bean:message key="label.sales.shipToCustomer"/>? &nbsp;<font color=red>*</font></font></td>
        <td width="54%"><font class="NArialL">
            <html:select name="QuotationForm" property="odmId" styleClass="txfield" onchange="javascript:showHideNewEndCustomerField();"> <%--onchange="javascript:selectODM(this);"--%>
                <html:option value="-1" >----- Select -----</html:option>
                <html:options collection="odmList" property="value" labelProperty="label"/>
                <html:option value="-2" >-----Add New-----</html:option>
            </html:select>
        <html:hidden name="QuotationForm" property="odm" /></font></td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#DEE1E2">
       <td class="NArialL"><span id="endCustomerLabelSpan" style="display:none">&nbsp;&nbsp;&nbsp; New <bean:message key="label.sales.shipToCustomer"/> :</span></td>
       <td ><span id="endCustomerTxfieldSpan" style="display:none"><html:text name="QuotationForm" property="newEndCustomerName" styleClass="txfield"/></span></td>
       <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#FFFFEE">
        <td width="45%"><font class="NArialL"><b>2.</b> Who is the <bean:message key="label.sales.endUser"/>? <font color=red>*</font></font>
        <td width="54%"><font class="NArialL">
        <html:select name="QuotationForm" property="endCustomerId" styleClass="txfield" onchange="showHideNewEndUserField()">
                    <html:option value="" >----- Select -----</html:option>
                    <html:options collection="endCustomerList" property="value" labelProperty="label"/>
                    <html:option value="-2" >-----Add New-----</html:option>
                </html:select>
                <html:hidden name="QuotationForm" property="endCustomer" /></font></td>
        <%--<td width="54%"><html:text name="QuotationForm" property="odm" styleClass="txfield" size="25" maxlength="50" /></td>--%>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#FFFFEE">
       <td width="45%" class="NArialL"><span id="endUserLabelSpan" style="display:none">&nbsp;&nbsp;&nbsp; New <bean:message key="label.sales.endUser"/> :</span></td>
       <td width="55%"><span id="endUserTxfieldSpan" style="display:none"><html:text name="QuotationForm" property="newEndUserName" styleClass="txfield"/></span></td>
       <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#DEE1E2" >
        <td width="45%"><font class="NArialL"><b>3.</b> What type of quote do you need? &nbsp<font color=red>*</font></font></td>
        <td width="54%">
           <html:select name="QuotationForm" property="quotationType"  styleClass="txfield"  style="width:170px">
               <html:option value="-1">----- Select ----- </html:option>
               <html:options collection="quotationTypesList" property="label" labelProperty="label" />
           </html:select>
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
        <html:hidden property="customerId" name="QuotationForm"/>
        <html:hidden property="quotationNo" name="QuotationForm"/>

    </tr>
    <tr bgcolor="#FFFFEE">
        <td width="45%"><font class="NArialL"><b>4.</b> What is the prev quotation number?&nbsp;</font></td>
        <td width="54%"><font class="NArialL"><html:text name="QuotationForm" property="prevQuotationNo" styleClass="txfield" size="25" maxlength="50" />&nbsp;&nbsp;<a href="javascript:loadPrevQuotations()">Prev Quotations</a></font></td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>

    <tr bgcolor="#DEE1E2">
        <td width="45%"><font class="NArialL"><b>5.</b> Pricing </font></td>
        <td width="54%"><font class="NArialL"><a href="javascript:loadQuotationsPrices()">Current Price</a></font></td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>

    <tr bgcolor="#FFFFEE">
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;  <b>a.</b> What is their current price?&nbsp;</font></td>
        <td width="54%"><font class="NArialL">
            <table  width="100%" border="0">
                <tr>
                    <td width="71%"><font class="NArialL">
                     $<html:text name="QuotationForm"  styleClass="valuetxfield" onkeypress="javascript:restrictCharacters(this,7,3)" property="currentPrice" size="7" maxlength="10" />/Chips@<html:text name="QuotationForm"  property="currentPriceUnits" size="7" maxlength="7" styleClass="valuetxfield" onkeypress="javascript:allowInteger()"/>Units
                     /<html:select name="QuotationForm" property="currentPriceUnitsType"  styleClass="txfield" onchange="javascript: showHidepriceOthersField();" style="width:70px">
                        <html:option value="-1">Select</html:option>
                            <html:options collection="qtyPerOptionsList" property="value" labelProperty="label" />
                       </html:select>&nbsp;</font>
                    </td>
                    <td width="10%" align="left"><font class="NArialL"><span id="currentPriceOthersLabelSpan" style="display:none">Others :</span></font></td>
                    <td width="17%" align="left"><font class="NArialL"><span id="currentPriceOthersTxfieldSpan" style="display:none"><html:text name="QuotationForm"  property="currentPriceOthers" styleClass="txfield" size="9" maxlength="15" /></span></font></td>
                </tr>
            </table>
            </font>
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#DEE1E2" >
        <td width="45%"><font class="NArialL">&nbsp; &nbsp; <b>b.</b> What is their target price?&nbsp;</font></td>
        <td width="54%">
            <font class="NArialL">
            <table  width="100%" border="0">
                <tr>
                    <td width="71%"><font class="NArialL">
                     $<html:text name="QuotationForm"  property="targetPrice" styleClass="valuetxfield" onkeypress="javascript:restrictCharacters(this,7,3)" size="7" maxlength="10" onblur="javascript:calculateMargin()"/>/Chips@<html:text name="QuotationForm"  property="targetPriceUnits" styleClass="valuetxfield" onkeypress="javascript:allowInteger()" size="7" maxlength="7" onblur="javascript:calculateMargin()"/>Units
                     /<html:select name="QuotationForm" property="targetPriceUnitsType"  styleClass="txfield" onchange="javascript:showHideTargetPriceOthersField();" style="width:70px">
                        <html:option value="-1">Select</html:option>
                            <html:options collection="qtyPerOptionsList" property="value" labelProperty="label" />
                       </html:select>&nbsp;</font>
                    </td>
                    <td width="10%" align="left"><font class="NArialL"><span id="targetPriceOthersLabelSpan" style="display:none">Others : </span></font></td>
                    <td width="17%" align="left"><font class="NArialL"><span id="targetPriceOthersTxfieldSpan" style="display:none"><html:text name="QuotationForm"  property="targetPriceOthers" styleClass="txfield" size="9" maxlength="15" /></span></font></td>
                </tr>
            </table>
            </font>
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#DEE1E2">
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Any other historical price information : </font></td>
        <td width="54%"><font class="NArialL">
            <html:textarea name="QuotationForm"  property="historyPricesInfo" styleClass="txfield" rows="3" cols="40" />
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#FFFFEE">
        <td width="45%"><font class="NArialL">&nbsp; &nbsp; c. Is there a contract?&nbsp;</font></td>
        <td width="54%"><font class="NArialL">
            <html:checkbox name="QuotationForm"  property="contractPriceFlag" styleClass="txfield"  onclick="contractPriceValidation(this)" />
        </font></td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#FFFFEE">
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            Please provide contract pricing document :</font></td>
        <td width="54%"><font class="NArialL">
            <html:file name="QuotationForm"  property="contractPriceFilePath" size="30" styleClass="txfield" disabled="true"  />(click here to upload the document)

        </font></td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>


    <tr bgcolor="#FFFFEE" >
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Why does the price need to be changed?  </font></td>
        <td width="54%"><font class="NArialL"><html:textarea name="QuotationForm"  property="contractPriceChangedReason" styleClass="txfield" rows="3" cols="40" disabled="true"/></font></td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>

    <tr bgcolor="#DEE1E2">
        <td width="45%"><font class="NArialL">&nbsp; &nbsp;d. How has the customer performed on their<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  previous commitments?  </font></td>
        <td width="54%"><font class="NArialL">
        <html:select name="QuotationForm" property="previousCommitments"  styleClass="txfield" style="width:110px" onchange="">
            <html:option value="-1">----- Select -----</html:option>
            <html:options collection="commitmentsList" property="label" labelProperty="label" />
        </html:select>Quantities, &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<a href="javascript:loadPrevCommitments()">Prev Commitments</a><br>
        <html:select name="QuotationForm" property="previousCommitmentsPrice"  styleClass="txfield" style="width:260px" onchange="">
            <html:option value="-1">----- Select ------</html:option>
            <html:options collection="quantityiesList" property="label" labelProperty="label" />
        </html:select>Pricing
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr  bgcolor="#DEE1E2">
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Additional info :  </font></td>
        <td width="54%"><font class="NArialL">
            <html:textarea name="QuotationForm"  property="commitmentAddtionalInfo" styleClass="txfield" rows="3" cols="40" />
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#FFFFEE">
        <td width="45%"><font class="NArialL">&nbsp; &nbsp;e. Does this negatively impact <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;any other pricing we have Quoted else where?  </font></td>
        <td width="54%"><font class="NArialL">
            <html:checkbox name="QuotationForm"  property="previousQuotation" styleClass="txfield" onclick="previousQuotationValidation(this)" /> &nbsp; &nbsp;
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>

    <tr bgcolor="#FFFFEE" >
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Explain :  </font></td>
        <td width="54%"><font class="NArialL">
            <html:textarea name="QuotationForm"  property="previousQuotationDetails" styleClass="txfield" rows="3" cols="40" disabled="true" />
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#DEE1E2">
        <td width="45%"><font class="NArialL">&nbsp; &nbsp;f. Why should <bean:message key="label.customerName"/> provide <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a price discount?  </font></td>
        <td width="54%"><font class="NArialL">
            <html:select name="QuotationForm" property="priceDiscountReason"  styleClass="txfield" size="5"  multiple="true" onchange="" style="width:200px" >
               <html:option value="-1">----- Select -----</html:option>
               <html:options collection="priceDiscountOptionsList" property="label" labelProperty="label" />
            </html:select>
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#DEE1E2">
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Comment :  </font></td>
        <td width="54%"><font class="NArialL">
            <html:textarea name="QuotationForm"  property="priceDiscountComments" styleClass="txfield" rows="3" cols="40" />
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#FFFFEE" >
        <td width="45%"><font class="NArialL">&nbsp; &nbsp;g. Is there a  rebate? &nbsp; </font></td>
        <td width="54%"><font class="NArialL"><html:checkbox name="QuotationForm"  property="rebate" styleClass="txfield" onclick="rebateValidation(this)" />  How much ?
        $<html:text name="QuotationForm"  property="rebateValue" styleClass="valuetxfield" disabled="true" onkeypress="javascript:restrictCharacters(this,7,3)" size="8" maxlength="10" />
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#FFFFEE" >
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Why is there a rebate needed for
      this <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;opportunity?</font></td>
        <td width="54%"><font class="NArialL"><html:textarea name="QuotationForm"  property="rebateOpertunity" disabled="true" styleClass="txfield" rows="3" cols="40" /></td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#FFFFEE">
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; What is the target rebate goal? &nbsp; </font></td>
        <td width="54%">
            <font class="NArialL">
                <table  width="100%" border="0">
                    <tr>
                        <td width="73%"><font class="NArialL">
                         <html:text name="QuotationForm"  property="rebateTargetValue" disabled="true" styleClass="valuetxfield" onkeypress="javascript:restrictCharacters(this,7,3)" size="8" maxlength="10" />&nbsp;
                            <html:select name="QuotationForm" property="rebateGoal"  styleClass="txfield" disabled="true" onchange="" style="width:80px">
                                <html:option value="-1">-Select-</html:option>
                                <html:options collection="rebateGoalsList" property="label" labelProperty="label" />
                            </html:select>
                            /<html:select name="QuotationForm" property="rebateTargetGoalTimeFrame"  styleClass="txfield" disabled="true" onchange="javascript:showHideRebateTargetPriceOthersField();" style="width:80px">
                            <html:option value="-1">-Select-</html:option>
                                <html:options collection="qtyPerOptionsList" property="value" labelProperty="label" />
                           </html:select>&nbsp;</font>
                        </td>
                        <td width="8%" align="left"><font class="NArialL"><span id="rebateTargetPriceOthersLabelSpan" style="display:none">Others </span></font></td>
                        <td width="17%" align="left"><font class="NArialL"><span id="rebateTargetPriceOthersTxfieldSpan" style="display:none"><html:text name="QuotationForm"  property="rebateTargetGoalTimeFrameOthers" styleClass="txfield" size="10" maxlength="15" /></span></font></td>
                    </tr>
                </table>
            </font>
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>

    <tr bgcolor="#FFFFEE" >
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; How will the rebate be verified? &nbsp; </font></td>
        <td width="540%"><font class="NArialL">
            <html:textarea name="QuotationForm"  property="rebateVerifiedBy" styleClass="txfield" rows="3" cols="40" />
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr  bgcolor="#DEE1E2">
        <td colspan ="3" width="100%"><font class="NArialL">6. Competition  </font></td>
    </tr>
    <tr  bgcolor="#FFFFEE">
        <td width="45%"><font class="NArialL">&nbsp; &nbsp; a. &nbsp;Who is the first competitor? </font></td>
        <td width="54%"><font class="NArialL">
             <table  width="100%" border="0">
                <tr>
                    <td width="30%"><font class="NArialL">
                       &nbsp; <html:select name="QuotationForm" property="competatior1"  styleClass="txfield" onchange="javascript:showHideCompetatior1OthersField();" >
                            <html:option value="-1">- Select -</html:option>
                            <html:options collection="competitorsList" property="value" labelProperty="label" />
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        </html:select></font>
                    </td>
                    <td width="10%" align="left"><font class="NArialL"><span id="competitor1OthersLabelSpan" style="display:none">Other :</span></font></td>
                    <td width="60%" align="left"><font class="NArialL"><span id="competitor1OthersTxfieldSpan" style="display:none"><html:text name="QuotationForm"  property="competatior1Others" styleClass="txfield" size="10" maxlength="30" /></span></font></td>
                </tr>
            </table>
        </font>
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>

    <tr bgcolor="#FFFFEE">
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; What is their price? </font></td>
        <td width="54%"><font class="NArialL">
           <table  width="100%" border="0">
                <tr>
                    <td width="73%"><font class="NArialL">
                     $<html:text name="QuotationForm"  property="competatior1Price" styleClass="valuetxfield" onkeypress="javascript:restrictCharacters(this,7,3)" size="8" maxlength="30" />/Chips@<html:text name="QuotationForm"  property="competatior1PriceUnit" size="7" maxlength="7" styleClass="valuetxfield" onkeypress="javascript:allowInteger()"/>Units/
                    <html:select name="QuotationForm" property="competatior1PriceUnitsType"  styleClass="txfield" onchange="javascript: showHideCompetatior1PriceUnitsTypeField();" style="width:70px">
                        <html:option value="-1">Select</html:option>
                            <html:options collection="qtyPerOptionsList" property="value" labelProperty="label" />
                       </html:select>&nbsp;</font>
                    </td>
                    <td width="10%" align="left"><font class="NArialL"><span id="competitor1PriceOthersLabelSpan" style="display:none">Others</span></font></td>
                    <td width="15%" align="left"><font class="NArialL"><span id="competitor1PriceOthersTxfieldSpan" style="display:none"><html:text name="QuotationForm"  property="competatior1PriceUnitOthers" styleClass="txfield" size="10" maxlength="15" /></span></font></td>
                </tr>
            </table></font>
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#FFFFEE">
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Comment : </font></td>
        <td width="54%"><font class="NArialL">
            <html:textarea name="QuotationForm"  property="competatior1Comments" styleClass="txfield" rows="3" cols="40" />
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#DEE1E2">
        <td width="45%"><font class="NArialL">&nbsp; &nbsp; b. &nbsp;Who is the second competitor? </font></td>
        <td width="54%"><font class="NArialL">
            <table  width="100%" border="0">
                <tr>
                    <td width="30%"><font class="NArialL">
                        &nbsp;<html:select name="QuotationForm" property="competatior2"  styleClass="txfield" onchange="javascript:showHideCompetatior2OthersField();" >
                            <html:option value="-1">- Select -</html:option>
                            <html:options collection="competitorsList" property="value" labelProperty="label" />
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        </html:select></font>
                    </td>
                    <td width="10%" align="left"><font class="NArialL"><span id="competitor2OthersLabelSpan" style="display:none">Other : </span></font></td>
                    <td width="60%" align="left"><font class="NArialL"><span id="competitor2OthersTxfieldSpan" style="display:none"><html:text name="QuotationForm"  property="competatior2Others" styleClass="txfield" size="10" maxlength="30" /></span></font></td>
                </tr>
            </table>
            </font>
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>

    <tr bgcolor="#DEE1E2">
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; What is their price? </font></td>
        <td width="54%"><font class="NArialL">
           <table  width="100%" border="0">
                <tr>
                    <td width="73%"><font class="NArialL">
                     $<html:text name="QuotationForm"  property="competatior2Price" styleClass="valuetxfield" onkeypress="javascript:restrictCharacters(this,7,3)" size="8" maxlength="30" />/Chips@<html:text name="QuotationForm"  property="competatior2PriceUnit" size="7" maxlength="7" styleClass="valuetxfield" onkeypress="javascript:allowInteger()"/>Units/
                    <html:select name="QuotationForm" property="competatior2PriceUnitsType"  styleClass="txfield" onchange="javascript: showHideCompetatior2PriceUnitsTypeField();" style="width:70px">
                        <html:option value="-1">Select</html:option>
                            <html:options collection="qtyPerOptionsList" property="value" labelProperty="label" />
                       </html:select>&nbsp;</font>
                    </td>
                    <td width="10%"><font class="NArialL"><span id="competitor2PriceOthersLabelSpan" style="display:none">Others</span></font></td>
                    <td width="15%"><font class="NArialL"><span id="competitor2PriceOthersTxfieldSpan" style="display:none"><html:text name="QuotationForm"  property="competatior2PriceUnitOthers" styleClass="txfield" size="10" maxlength="15" /></span></font></td>
                </tr>
            </table></font>
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#DEE1E2">
        <td width="45%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Comment : </font></td>
        <td width="54%"><font class="NArialL">
            <html:textarea name="QuotationForm"  property="competatior2Comments" styleClass="txfield" rows="3" cols="40" />
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>

    <tr bgcolor="#FFFFEE" >
        <td colspan ="3" width="100%"><font class="NArialL">7. Distributor Margin  </font></td>
    </tr>
    <tr bgcolor="#DEE1E2" >
        <td width="45%"><font class="NArialL">&nbsp; &nbsp; a. What is the distributor margin? </font></td>
        <td width="54%"><font class="NArialL">
            &nbsp; <html:text name="QuotationForm"  property="distributorMargin" styleClass="valuetxfield" onkeypress="javascript:restrictCharacters(this,7,3)" size="10" maxlength="30" onblur="javascript:calculateMargin()"/>%
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#FFFFEE" >
        <td width="45%"><font class="NArialL">&nbsp; &nbsp; b. Margin dollars :  <br> &nbsp; &nbsp; &nbsp; &nbsp; [(distri margin %) * (ASP)* (# Of units)]? </font></td>
        <td width="54%"><font class="NArialL">
            $<html:text name="QuotationForm"  property="marginDollars" styleClass="valuetxfield" readonly="true" onkeypress="javascript:restrictCharacters(this,7,3)" size="10" maxlength="30" />
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#DEE1E2">
        <td width="45%"><font class="NArialL">&nbsp; &nbsp; c. What have they done to earn these <br> &nbsp; &nbsp; &nbsp; &nbsp; margin dollars?	  </font></td>
        <td width="54%"><font class="NArialL">
             <html:textarea name="QuotationForm"  property="totalPrevMargins" styleClass="txfield" rows="3" cols="40" />
        </td>
        <td width="1%"><font class="NArialL">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#DEE1E2" >
        <td width="30%"><font class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Why do they need this margin? </font></td>
        <td width="40%"><font class="NArialL">
             <html:textarea name="QuotationForm"  property="marginReason" styleClass="txfield" rows="3" cols="40" /></td>
        <td width="5%"><font class="NArialL">&nbsp;</font></td>
    </tr>
</tr>
    <tr>
        <td colspan=6 align=center>
            <chiptrack:restrictedLink functionality='<%=Functionality.SALES_NEW_QUOTATION%>' action='<%=User.USER_ACTION_MODIFY%>' href="javascript:submitPage();" onmouseover="window.status='Click here to save new Quote';return true" onmouseout="window.status='';return true">
            <img src="<%=chipTracContext%>/jsp/includes/images/next.gif" title='Click here to save new Quote' border='0'></chiptrack:restrictedLink>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="javascript:resetForm();" onmouseover="window.status='Click to Reset Values';return true" title="Click here to Reset" onmouseout="window.status='';return true" ><img src="<%=chipTracContext%>/jsp/includes/images/reset.gif" border='0'></a>
        </td>
    </tr>
    </table>
    <input type="hidden" name="customerName" value='<%= ( quotationForm.getCustomerName() == null ) ? "" : quotationForm.getCustomerName() %>' />
    <input type="hidden" name="billingAddressId" value='<%= quotationForm.getBillingAddressId() %>' />
    <input type="hidden" name="shippingMethodName" value='<%= ( quotationForm.getShippingMethodName() == null ) ? "" : quotationForm.getShippingMethodName() %>' />
    <input type="hidden" name="quotationDate" value='<%= ( quotationForm.getQuotationDate() == null ) ? "" : quotationForm.getQuotationDate()%>' />
    <input type="hidden" name="isSample" value="<%=request.getParameter("isSample")%>"/>
	<input type="hidden" name="shipAccount1" value="<%=request.getAttribute("Method")%>"/>
    <input type="hidden" name="distributor" value="<%= quotationForm.isDistributor() %>"/>
</html:form>
</html:html>
<%-- till here --%>
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>

<%-- Footer starts here --%>

<%@ include file="/jsp/includes/footer.jsp" %>

<%-- footer end here --%>

</BODY>
<%--
<% }catch(Exception e){e.printStackTrace();} %>--%>
